package com.bishe.demo.modules.hotel.hotelRoom.dao;

import com.bishe.demo.modules.hotel.hotelRoom.entity.Room;
import com.bishe.demo.modules.hotel.hotelRoom.entity.RoomBed;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface RoomBedDao {
    @Insert("insert into hotel_room_bed values(null,#{roomId},#{bedId})")
    @Options(useGeneratedKeys = true, keyProperty="id",keyColumn = "id")
    void insertRoomBed(RoomBed roomBed);

    @Delete("delete from hotel_room_bed where room_id=#{roomId}")
    void deleteRoomBedByRoomId(int roomId);
}
